#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:p="http://primefaces.org/ui"
                 template="/template/mainTemplate.xhtml"
                 xmlns:x="http://xpert.com/faces">
    <ui:param name="title" value="${symbol_pound}{msg['pessoaExemplo.list']}" />
    <ui:define name="body">
        <ui:include src="menuPessoaExemplo.xhtml" />
        <h:form id="formListPessoaExemplo">
            <x:modalMessages/>

            <x:dataTableActions fileName="pessoaExemplo_export" target=":formListPessoaExemplo:dataTablePessoaExemplo"
                                     widgetVar="dataTablePessoaExemploWidget"  />

            <p:dataTable paginator="true" rows="10" rowsPerPageTemplate="10,20,30" paginatorPosition="bottom" emptyMessage="${symbol_pound}{xmsg['noRecordFound']}"
                         var="pessoaExemplo" rowIndexVar="index" id="dataTablePessoaExemplo" widgetVar="dataTablePessoaExemploWidget" styleClass="table-responsive"
                         currentPageReportTemplate="${symbol_pound}{pessoaExemploMB.dataModel.currentPageReportTemplate}"
                         paginatorTemplate="${symbol_pound}{pessoaExemploMB.dataModel.paginatorTemplate}"
                         value="${symbol_pound}{pessoaExemploMB.dataModel}" lazy="true" >
                <p:column styleClass="uix-datatable-index">
                    <h:outputText value="${symbol_pound}{index+1}"/>
                </p:column>
                <p:column headerText="${symbol_pound}{msg['pessoaExemplo.nome']}" sortBy="${symbol_pound}{pessoaExemplo.nome}"
                    filterBy="${symbol_pound}{pessoaExemplo.nome}"   >
                    <f:facet name="header">
                        <h:outputText value="${symbol_pound}{msg['pessoaExemplo.nome']}" />
                    </f:facet>
                    <h:outputText value="${symbol_pound}{pessoaExemplo.nome}"/>
                </p:column>
                <p:column headerText="${symbol_pound}{msg['pessoaExemplo.email']}" sortBy="${symbol_pound}{pessoaExemplo.email}"
                    filterBy="${symbol_pound}{pessoaExemplo.email}"   >
                    <f:facet name="header">
                        <h:outputText value="${symbol_pound}{msg['pessoaExemplo.email']}" />
                    </f:facet>
                    <h:outputText value="${symbol_pound}{pessoaExemplo.email}"/>
                </p:column>
                <p:column headerText="${symbol_pound}{msg['pessoaExemplo.salary']}" sortBy="${symbol_pound}{pessoaExemplo.salary}"
                       style="text-align: right;">
                    <f:facet name="header">
                        <h:outputText value="${symbol_pound}{msg['pessoaExemplo.salary']}" />
                    </f:facet>
                    <h:outputText value="${symbol_pound}{pessoaExemplo.salary}">
                        <f:convertNumber minFractionDigits="2" maxFractionDigits="2" />
                    </h:outputText>
                </p:column>
                <p:column headerText="${symbol_pound}{msg['pessoaExemplo.dataNascimento']}" sortBy="${symbol_pound}{pessoaExemplo.dataNascimento}"
                    filterBy="${symbol_pound}{pessoaExemplo.dataNascimento}"   style="text-align: center;">
                    <f:facet name="header">
                        <h:outputText value="${symbol_pound}{msg['pessoaExemplo.dataNascimento']}" />
                        <x:dateFilter/>
                    </f:facet>
                    <h:outputText value="${symbol_pound}{pessoaExemplo.dataNascimento}">
                        <f:convertDateTime />
                    </h:outputText>
                </p:column>
                <p:column headerText="${symbol_pound}{msg['pessoaExemplo.horario']}" sortBy="${symbol_pound}{pessoaExemplo.horario}"
                       style="text-align: center;">
                    <f:facet name="header">
                        <h:outputText value="${symbol_pound}{msg['pessoaExemplo.horario']}" />
                    </f:facet>
                    <h:outputText value="${symbol_pound}{pessoaExemplo.horario}">
                        <f:convertDateTime pattern="HH:mm"/>
                    </h:outputText>
                </p:column>
                <p:column headerText="${symbol_pound}{msg['pessoaExemplo.rg']}" sortBy="${symbol_pound}{pessoaExemplo.rg}"
                    filterBy="${symbol_pound}{pessoaExemplo.rg}"   >
                    <f:facet name="header">
                        <h:outputText value="${symbol_pound}{msg['pessoaExemplo.rg']}" />
                    </f:facet>
                    <h:outputText value="${symbol_pound}{pessoaExemplo.rg}"/>
                </p:column>
                <p:column headerText="${symbol_pound}{msg['pessoaExemplo.active']}" sortBy="${symbol_pound}{pessoaExemplo.active}"
                    filterBy="${symbol_pound}{pessoaExemplo.active}" filterOptions="${symbol_pound}{booleanSelectItensEmptyOption}"  style="text-align: center;">
                    <f:facet name="header">
                        <h:outputText value="${symbol_pound}{msg['pessoaExemplo.active']}" />
                    </f:facet>
                    <h:outputText value="${symbol_pound}{pessoaExemplo.active}" converter ="yesNoConverter" />
                </p:column>
                <p:column styleClass="uix-datatable-actions" exportable="false" headerText="${symbol_pound}{xmsg['actions']}">
                    <f:facet name="header">
                        <h:outputText value="${symbol_pound}{xmsg['actions']}"/>
                    </f:facet>
                    <p:commandButton oncomplete="PF('widgetPessoaExemploDetail').show();"  icon="ui-icon-zoomin" 
                                     process="@form" update=":formDetailPessoaExemplo" title="${symbol_pound}{xmsg['detail']}" >
                        <f:setPropertyActionListener value="${symbol_pound}{pessoaExemplo}" target="${symbol_pound}{pessoaExemploMB.entity}" />
                    </p:commandButton>
                    <x:securityArea rolesAllowed="pessoaExemplo.create">
                        <p:button icon="ui-icon-pencil" outcome="createPessoaExemplo" title="${symbol_pound}{xmsg['edit']}">
                            <f:param name="id" value="${symbol_pound}{pessoaExemplo.id}" />
                        </p:button>
                    </x:securityArea>
                    <x:securityArea rolesAllowed="pessoaExemplo.delete">
                        <p:commandButton icon="ui-icon-trash" title="${symbol_pound}{xmsg['delete']}" process="@form" update="@form" 
                                         action="${symbol_pound}{pessoaExemploMB.delete}" >
                            <f:setPropertyActionListener value="${symbol_pound}{pessoaExemplo.id}" target="${symbol_pound}{pessoaExemploMB.id}" />
                            <x:confirmation message="${symbol_pound}{xmsg['confirmDelete']} - ${symbol_pound}{pessoaExemplo}" />
                        </p:commandButton>
                    </x:securityArea>
                </p:column>
            </p:dataTable>
            <div class="uix-audit-delete">
                <x:securityArea rolesAllowed="pessoaExemplo.audit">
                    <x:auditDelete for="${symbol_pound}{pessoaExemploMB.entityClass}"/>
                </x:securityArea>
            </div>  
        </h:form>

        <p:dialog widgetVar="widgetPessoaExemploDetail" header="${symbol_pound}{msg['pessoaExemplo.detail']}" appendTo="@(body)" 
                  modal="true" styleClass="uix-dialog-fluid" >
                  <ui:include src="detailPessoaExemplo.xhtml" />
        </p:dialog>
    </ui:define>
</ui:composition>